ppppmmmmddddaaaaIIIInnnniiiitttt initializes a PMDA so that it is ready to receive PDUs from
ppppmmmmccccdddd(1). The function expects as arguments the instance domain table
(_i_n_d_o_m_s) and the metric description table (_m_e_t_r_i_c_s) that are initialized
by the PMDA. The arguments _n_i_n_d_o_m_s and _n_m_e_t_r_i_c_s should be set to the
number of instances and metrics in the tables, respectively.
Much of the ppppmmmmddddaaaaIIIInnnntttteeeerrrrffffaaaacccceeee structure can be automatically initialized with
ppppmmmmddddaaaaDDDDaaaaeeeemmmmoooonnnn(3), ppppmmmmddddaaaaGGGGeeeettttOOOOpppptttt(3) and ppppmmmmddddaaaaDDDDSSSSOOOO(3). ppppmmmmddddaaaaIIIInnnniiiitttt completes the PMDA
initialization phase with three operations. The first operation adds the
domain and instance numbers to the instance and metric tables. Singular
metrics (metrics without an instance domain) should have the instance
domain PPPPMMMM____IIIINNNNDDDDOOOOMMMM____NNNNUUUULLLLLLLL set in the _i_n_d_o_m field of the ppppmmmmDDDDeeeesssscccc structure (see
ppppmmmmLLLLooooooookkkkuuuuppppDDDDeeeesssscccc(3)). Metrics with an instance domain should set this field
to be the serial number of the instance domain in the _i_n_d_o_m_s table.
EEEEXXXXAAAAMMMMPPPPLLLLEEEE
For example, a PMDA has three metrics: A, B and C, and two instance
domains X and Y, with two instances in each instance domain. The
instance domain and metrics description tables could be defined as: